/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainForm.java
 *
 * Created on 24 Apr 12, 14:25:18
 */
package com.Main;

import com.DaftarPegawai.daftarPegawaiForm;
import com.DataPegawai.tambahPegawaiForm;
import com.PiketPegawai.PIketPegawaiForm;
import com.strukturOrganisasi.StrukturOrganisasiiForm;
import java.awt.Dimension;
import javax.swing.JFrame;

/**
 *
 * @author Ignacio
 */
public class MainForm extends javax.swing.JFrame {

    int count = 1;

    /** Creates new form MainForm */
    public MainForm() {
        initComponents();
//        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
        this.setResizable(false);
        this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        KepegawaianLabel = new javax.swing.JLabel();
        exitLabel = new javax.swing.JLabel();
        struktur = new javax.swing.JLabel();
        piket = new javax.swing.JLabel();
        kepegawaianLabel = new javax.swing.JLabel();
        kepegawaianLabel1 = new javax.swing.JLabel();
        kepegawaianLabel2 = new javax.swing.JLabel();
        kepegawaianLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sistem Kepegawaian Puskesmas Jebed");
        setBounds(new java.awt.Rectangle(0, 0, 0, 0));
        setResizable(false);

        jPanel2.setBackground(new java.awt.Color(153, 255, 204));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/imagePKM.png"))); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 902, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(106, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));

        KepegawaianLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icon pegawai.png"))); // NOI18N
        KepegawaianLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        KepegawaianLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                KepegawaianLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                KepegawaianLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                KepegawaianLabelMouseExited(evt);
            }
        });

        exitLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/exit.png"))); // NOI18N
        exitLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        exitLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                exitLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                exitLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                exitLabelMouseExited(evt);
            }
        });

        struktur.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/struktur.png"))); // NOI18N
        struktur.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        struktur.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                strukturMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                strukturMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                strukturMouseExited(evt);
            }
        });

        piket.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/iconpiket.png"))); // NOI18N
        piket.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        piket.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                piketMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                piketMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                piketMouseExited(evt);
            }
        });

        kepegawaianLabel.setFont(new java.awt.Font("Georgia", 1, 14));
        kepegawaianLabel.setForeground(new java.awt.Color(153, 204, 0));
        kepegawaianLabel.setText("KEPEGAWAIAN");

        kepegawaianLabel1.setFont(new java.awt.Font("Georgia", 1, 14));
        kepegawaianLabel1.setForeground(new java.awt.Color(153, 204, 0));
        kepegawaianLabel1.setText("STRUKTUR ORGANISASI");

        kepegawaianLabel2.setFont(new java.awt.Font("Georgia", 1, 14));
        kepegawaianLabel2.setForeground(new java.awt.Color(153, 204, 0));
        kepegawaianLabel2.setText("PIKET PEGAWAI");

        kepegawaianLabel3.setFont(new java.awt.Font("Georgia", 1, 14));
        kepegawaianLabel3.setForeground(new java.awt.Color(153, 204, 0));
        kepegawaianLabel3.setText("KELUAR");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(55, 55, 55)
                        .addComponent(KepegawaianLabel))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(65, 65, 65)
                        .addComponent(kepegawaianLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGap(30, 30, 30)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(41, 41, 41)
                        .addComponent(kepegawaianLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE)
                        .addComponent(kepegawaianLabel2)
                        .addGap(38, 38, 38))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addComponent(struktur)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 82, Short.MAX_VALUE)
                        .addComponent(piket)
                        .addGap(23, 23, 23)))
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addComponent(exitLabel))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(79, 79, 79)
                        .addComponent(kepegawaianLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(114, 114, 114))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(52, 52, 52)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(KepegawaianLabel)
                    .addComponent(struktur)
                    .addComponent(piket)
                    .addComponent(exitLabel))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(kepegawaianLabel1)
                    .addComponent(kepegawaianLabel)
                    .addComponent(kepegawaianLabel2)
                    .addComponent(kepegawaianLabel3))
                .addContainerGap(161, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-1015)/2, (screenSize.height-650)/2, 1015, 650);
    }// </editor-fold>//GEN-END:initComponents

    private void piketMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_piketMouseExited
        // TODO add your handling code here:
        piket.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/iconpiket.png")));
}//GEN-LAST:event_piketMouseExited

    private void piketMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_piketMouseEntered
        // TODO add your handling code here:
        piket.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/iconpiket-level.png")));
    }//GEN-LAST:event_piketMouseEntered

    private void piketMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_piketMouseClicked
        // TODO add your handling code here:
        PIketPegawaiForm call = new PIketPegawaiForm();
        call.setVisible(true);
        this.setVisible(false);
}//GEN-LAST:event_piketMouseClicked

    private void strukturMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_strukturMouseExited
        // TODO add your handling code here:
        struktur.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/struktur.png")));
}//GEN-LAST:event_strukturMouseExited

    private void strukturMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_strukturMouseEntered
        // TODO add your handling code here:
        struktur.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/struktur-level.png")));
    }//GEN-LAST:event_strukturMouseEntered

    private void strukturMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_strukturMouseClicked
        // TODO add your handling code here:
        StrukturOrganisasiiForm call = new StrukturOrganisasiiForm();
        call.setVisible(true);
        this.setVisible(false);
}//GEN-LAST:event_strukturMouseClicked

    private void exitLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_exitLabelMouseExited
        // TODO add your handling code here:
        exitLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/exit.png")));
}//GEN-LAST:event_exitLabelMouseExited

    private void exitLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_exitLabelMouseEntered
        // TODO add your handling code here:
        exitLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/exit-level.png")));
    }//GEN-LAST:event_exitLabelMouseEntered

    private void exitLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_exitLabelMouseClicked
        // TODO add your handling code here:
        System.exit(0);
}//GEN-LAST:event_exitLabelMouseClicked

    private void KepegawaianLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_KepegawaianLabelMouseExited
        // TODO add your handling code here:
        KepegawaianLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icon pegawai.png")));
}//GEN-LAST:event_KepegawaianLabelMouseExited

    private void KepegawaianLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_KepegawaianLabelMouseEntered
        // TODO add your handling code here:
        KepegawaianLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icon pegawai-level.png")));
}//GEN-LAST:event_KepegawaianLabelMouseEntered

    private void KepegawaianLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_KepegawaianLabelMouseClicked
        // TODO add your handling code here:
        daftarPegawaiForm test=new daftarPegawaiForm();
        test.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_KepegawaianLabelMouseClicked

    /**
     * @param args the command line arguments
     */
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel KepegawaianLabel;
    private javax.swing.JLabel exitLabel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JLabel kepegawaianLabel;
    private javax.swing.JLabel kepegawaianLabel1;
    private javax.swing.JLabel kepegawaianLabel2;
    private javax.swing.JLabel kepegawaianLabel3;
    private javax.swing.JLabel piket;
    private javax.swing.JLabel struktur;
    // End of variables declaration//GEN-END:variables
}
